import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listCompany(query) {
  return request({
    url: '/system/company/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getCompany(detail) {
  return request({
    url: '/system/company/' + detail,
    method: 'get'
  })
}

// 查询【请填写功能名称】详细
export function getBankUsers(id) {
  return request({
    url: '/system/company/getBankUsers',
    method: 'post',
    data: { companyId: id }
  })
}

// 查询【请填写功能名称】详细
export function getBankDicts(id) {
  return request({
    url: '/system/company/getBankDicts',
    method: 'post',
    data: { companyId: id }
  })
}

export function addBankUser(ids, companyId) {
  return request({
    url: '/system/company/addBankUser',
    method: 'post',
    data: { ids: ids, companyId: companyId }
  })
}
export function addBankDict(ids, companyId) {
  return request({
    url: '/system/company/addBankDict',
    method: 'post',
    data: { ids: ids, companyId: companyId }
  })
}
export function addBankDicts(ids, companyId) {
  return request({
    url: '/system/company/addBankDicts',
    method: 'post',
    data: { lists: ids, companyId: companyId }
  })
}

// 新增【请填写功能名称】
export function addCompany(data) {
  return request({
    url: '/system/company',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateCompany(data) {
  return request({
    url: '/system/company',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delCompany(detail) {
  return request({
    url: '/system/company/' + detail,
    method: 'delete'
  })
}

// 导出【请填写功能名称】
export function exportCompany(query) {
  return request({
    url: '/system/company/export',
    method: 'get',
    params: query
  })
}

//活动生成兑换码
export function createCompanyCode(data) {
  return request({
    url: '/system/exchange/batch',
    method: 'post',
    data: data
  })
}
